home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 March / EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso / earcd / program / palis102.lha / Palis / PatchTest / src / lib / ChkLib.c next >
C/C++ Source or Header  |  1992-09-02  |  2KB  |  81 lines

  1. /*
  2.     ·C·O·D·E·X· ·D·E·S·I·G·N· ·S·O·F·T·W·A·R·E·
  3.     presents
  4.  
  5.     TestPatch.library
  6.  
  7.     this program will check whether library patching is observed by
  8.     a PatchManager like SaferPatches or PALIS.
  9.     returns appropiate codes to the caller.
  10.  
  11.     FILE:    ChkLib.c
  12.     TASK:    SAS/C library
  13.  
  14.     (c)1995 by Hans Bühler, codex@stern.mathematik.hu-berlin.de
  15. */
  16.  
  17. #include    "/chk.h"
  18. #include    <stdio.h>
  19.  
  20. // ---------------------------
  21. // defines
  22. // ---------------------------
  23.  
  24. // ---------------------------
  25. // datatypes
  26. // ---------------------------
  27.  
  28. // ---------------------------
  29. // proto
  30. // ---------------------------
  31.  
  32. extern int    __asm __UserLibInit(register __a6 struct Library *LibBase);
  33. extern void    __asm __UserLibCleanup(register __a6 struct Library *LibBase);
  34. extern void __asm __interrupt LIB_DummyFunc(void);
  35.  
  36. // ---------------------------
  37. // vars
  38. // ---------------------------
  39.  
  40. struct IntuitionBase    *IntuitionBase    =    0;
  41. struct ExecBase        *SysBase            =    0;
  42.  
  43. // ---------------------------
  44. // funx1
  45. // ---------------------------
  46.  
  47. /*
  48.     OpenLibrary()
  49.     -------------
  50. */
  51.  
  52. int __asm __UserLibInit(register __a6 struct Library *LibBase)
  53. {
  54.     SysBase            =    *((struct ExecBase **)4);
  55.     IntuitionBase    =    (struct IntuitionBase *)OldOpenLibrary("intuition.library");
  56.  
  57.     return 0;
  58. }
  59.  
  60. /*
  61.     CloseLibrary()
  62.     --------------
  63. */
  64.  
  65. void __asm __UserLibCleanup(register __a6 struct Library *LibBase)
  66. {
  67.     if(IntuitionBase)
  68.         CloseLibrary((struct Library *)IntuitionBase);
  69. }
  70.  
  71. // ---------------------------
  72. // funx2
  73. // ---------------------------
  74.  
  75. void __asm __interrupt LIB_DummyFunc(void)
  76. {
  77.     DisplayBeep(0);
  78. }
  79.  
  80.  
  81.